
//
//  FiltrateCategoryWithSortPickerCell.m
//  pmm
//
//  Created by WTFSSD on 2017/9/7.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "FiltrateCategoryWithSortPickerCell.h"
#import "NSArray+Extention.h"

@interface FiltrateCategoryWithSortPickerCell()

/**更多*/
@property(nonatomic,strong,readwrite)UIButton* moreButton;
@end

@implementation FiltrateCategoryWithSortPickerCell

/**lazy 更多*/
-(UIButton*)moreButton{
    if (!_moreButton) {
        _moreButton = [UIButton makeButton:^(UIButton *button) {
            button
            .setTitle(@"更多",UIControlStateNormal)
            .setTitleFont([UIFont systemFontOfSize:12])
            .setTitleColor(HexColor(0x333333),UIControlStateNormal);
        }];
        [self.contentView addSubview:_moreButton];
    }
    return _moreButton;
    
}

-(void)setCategorys:(NSArray<NSString *> *)categorys{
    NSArray * arr = [categorys map:^id(id obj, int index) {
        if (index<8) {
            return obj;
        }else{
            return nil;
        }
    }];

    [super setCategorys:arr];
}



@end
